let obj = {}
let OInput = document.querySelector('#input')
let OSpan =  document.querySelector('#span')

Object.defineProperties(obj,'text', {
    configurable:true,
    enumerable:true,
    get(){
        console.log('获取到了数据')
    },
    set(val) {
        console.log('数据更新了')
        OInput.value = val
        OSpan.innerHTML = val
    }
})

OInput.addEventListener('keyup', function (e){
    obj.text = e.target.value
})
